#!/usr/bin/env node

const qq = require('qqjs')
const getHerokuS3Bucket = require('../utils/getHerokuS3Bucket')

qq.config.silent = false
qq.run(async () => {
  await qq.x('./node_modules/.bin/oclif upload:deb')
  const HEROKU_S3_BUCKET = getHerokuS3Bucket()

  await qq.x(`aws s3 cp --content-type text/plain --cache-control "max-age: 604800" /home/runner/work/cli/cli/packages/cli/dist/apt/release.key "s3://${HEROKU_S3_BUCKET}/channels/stable/apt/release.key"`)
})
